package com.amigo.online.provider.video.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.amigo.online.common.core.mybatis.MyMapper;
import com.amigo.online.common.param.dto.video.VideoQueryDto;
import com.amigo.online.common.param.dto.video.VideoUpInfo;
import com.amigo.online.provider.video.model.entity.VideoUp;

@Mapper
@Component
public interface VideoUpMapper extends MyMapper<VideoUp> {

    VideoUp findByVideoIdAndUserid(@Param("videoId") Long videoId, @Param("userId") Long userId);

    List<Long> selectVideoIds(VideoQueryDto videoQueryDto);

    List<Long> findUserUpStateByUserIdAndVideoIds(@Param("id") Long id, @Param("ids") List<Long> videoIds);

    List<VideoUpInfo> getUpByVideoId(List<Long> videoIds);

    int add(VideoUp vp);

}
